package project.ekko.listener.processor;

import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent;
import project.ekko.listener.KeyEvent;

import java.util.function.Consumer;

public class ExitProcessor implements Consumer<KeyEvent> {

    @Override
    public void accept(KeyEvent event) {
        if (event.keyCode() == NativeKeyEvent.VC_ESCAPE) {
            System.exit(1);
        }
    }

}
